<?php

function smarty_function_article($params, $smarty)
{
    $id = $params['id'];

    $a = new Articles();
    $item = $a->getById( intval($id) );
    $smarty->assign('article', $item);
    return $smarty->fetch('article.tpl');
    /*$namespace = 'Site.Code.' . $params['name'];
    using($namespace);
    $className = $params['name'];
    $module = new $className();
    return $module->showOnPage();*/
}